import request from '@/utils/request'

export function findPermissiontList() {
  return request({
    url: '/permissions/simple'
  })
}

// 权限列表
export function GetPermissiontList(params) {
  return request({
    url: '/permissions',
    params
  })
}

// 增加权限组
export function AddPermissiont(data) {
  return request({
    url: '/permissions',
    method: 'POST',
    data
  })
}

// 清除权限组
export function deletePermissiont(id) {
  return request({
    url: `/permissions/${id}`,
    method: 'DELETE'
  })
}

// 编辑权限组
export function putPermissiont(id,permissions,title) {
  return request({
    url: `/permissions/${id}`,
    method: 'PUT',
    data: {
      id,
      permissions,
      title
    }
  })
}
// 权限组详情
export function PermissiontDetails(id) {
  return request({
    url: `/permissions/${id}`,
    method: 'GET'
  })
}
